﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TMIS.DAL
{
    public class Education
    {
        private Model.ThesisDB db = new Model.ThesisDB();
        /// <summary>
        /// 获取教师学历
        /// </summary>
        /// <returns></returns>
        public string[] Get()
        {
            string[] education = (from e in db.Education
                                  select e.Name).ToArray();
            return education;
        }
        /// <summary>
        /// 获取学历对应的ID号
        /// </summary>
        /// <param name="education"></param>
        /// <returns></returns>
        public Guid Get(string education)
        {
            Guid id = (from e in db.Education
                       where e.Name== education
                       select e.ID).FirstOrDefault();
            return id;
        }
    }
}
